#ifndef _CITY_PATH_H_
#define _CITY_PATH_H_

#include "math/spline2d.h"

namespace city
{
class CityMap;

class	CityPath
{
public:
							CityPath(CityMap* pScene, int Type);
							~CityPath();
	void					CreateFromSpline(const math::SplineCache2D& Spline);
	void					RenderDebug(const math::Vec2& Offset);
	void					Tick(float dt);
	bool					HitTest(const math::Vec2& Pos, float Radius = 10/800.0f);
	math::SplineCache2D&	GetSpline() { return m_Spline; };
	math::Vec2				GetPos();	// gets the starting position
	void					SetFrom(int	From) { m_FromNode = From; };
	void					SetTo(int	To) { m_ToNode = To; };
	int						GetFrom() const { return m_FromNode; };
	int						GetTo() const { return m_ToNode; };
	int						GetType() const { return m_Type; };
	bool					TestEnds(int From, int To);
private:
	CityMap*				m_pScene;
	math::SplineCache2D		m_Spline;
	int						m_Type;
	int						m_FromNode, m_ToNode;

};

} // namespace city

#endif // _CITY_PATH_H_